﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

namespace DreamBuilder.UI.UserControls
{
    public class ListTemplateCheckHeader : ITemplate
    {
        private bool boolStatus;
        public ListTemplateCheckHeader() { }
        public ListTemplateCheckHeader(bool boolStatus)
        {
            this.boolStatus = boolStatus;
        }
        public void InstantiateIn(Control container)
        {
            System.Web.UI.WebControls.CheckBox objCheck = new System.Web.UI.WebControls.CheckBox();
            objCheck.ID = "chkSelAll";
            objCheck.Attributes.Add("onclick", "ListCheck(this);");
            objCheck.AutoPostBack = false;
            objCheck.Checked = boolStatus;
            objCheck.EnableViewState = false;
            container.Controls.Add(objCheck);
        }
    }
}
